<template>
  <view class="tn-flex tn-flex-direction-column">
    <view class="tn-margin-top tn-margin-left tn-margin-right">
      <view class="tn-margin-bottom tn-skeleton-fillet content">
        <view class="cx-editor justify-content-item">
          <mp-html v-if="data.content" :content="data.content" :preview-img="true" :show-img-menu="false" :lazy-load="true"/>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
  import base from '@/common/mixin/base.js';
	import request from '@/common/request.js';
  export default {
    name: 'demand-detail-info',
    mixins: [base],
    data(){
      return {
        model: 'business/demand/detail',
        data: {},
      }
    },
    props: {
      demand_id: {
        type: [String, Number], 
        required: true
      }
    },
    methods: {
      getDetail: function() {
        let url = this.model + '/data';
        request.httpRequest(url, {demand_id: this.demand_id}).then(res => {
          this.data = res;
        });
      },
    },
    created() {
      this.getDetail()
    }
  }
</script>

<style lang="scss" scoped>
  @import '@/static/scss/common.scss';
</style>